Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/common/src/commonTest/kotlin/org/meshtastic/core/common/util/Crc32Test.kt 5235b8fc51eb5f46d453effb2deec00bcc6abdbb (5235b8fc) Text, 1.47 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.common.util

Tff7b72import T7ee787okio.ByteString
Tff7b72import T7ee787okio.ByteString.Companion.encodeUtf8
Tff7b72import T7ee787okio.ByteString.Companion.toByteString
Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertEquals

Tff7b72class T56d364Crc32Test Tb4b4b4{

Tf0883e@Test
Tff7b72fun Td2a8ffmatchesStandardCheckValueTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertEqualsTb4b4b4(T79c0ff0Te6edf3xCBF43926uTb4b4b4, Ta5d6ff"Ta5d6ff123456789Ta5d6ff"Tb4b4b4.Te6edf3encodeUtf8Tb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3crc32Tb4b4b4(Tb4b4b4)Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ffmatchesZlibForAsciiTextTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertEqualsTb4b4b4(T79c0ff0Te6edf3x414FA339uTb4b4b4, Ta5d6ff"Ta5d6ffThe quick brown fox jumps over the lazy dogTa5d6ff"Tb4b4b4.Te6edf3encodeUtf8Tb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3crc32Tb4b4b4(Tb4b4b4)Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ffmatchesZlibForKeySizedBufferTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3key Tff7b72= Te6edf3ByteArrayTb4b4b4(T79c0ff3T79c0ff2Tb4b4b4) Tb4b4b4{ Tffa657itTb4b4b4.Te6edf3toByteTb4b4b4(Tb4b4b4) Tb4b4b4}Tb4b4b4.Te6edf3toByteStringTb4b4b4(Tb4b4b4)
Te6edf3assertEqualsTb4b4b4(T79c0ff0Te6edf3x91267E8AuTb4b4b4, Te6edf3keyTb4b4b4.Te6edf3crc32Tb4b4b4(Tb4b4b4)Tb4b4b4)
Tb4b4b4}

Tf0883e@Test
Tff7b72fun Td2a8ffemptyInputYieldsZeroTb4b4b4(Tb4b4b4) Tb4b4b4{
Te6edf3assertEqualsTb4b4b4(T79c0ff0Te6edf3uTb4b4b4, Te6edf3ByteStringTb4b4b4.Te6edf3EMPTYTb4b4b4.Te6edf3crc32Tb4b4b4(Tb4b4b4)Tb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.05s